#!/usr/bin/env bash
# NOTE: this script should be called from the parent directory to
# properly work.

export CURRENT_VERSION=$1;
export BUILD_DATE=$(date -R);
export CURRENT_HASH=${CURRENT_HASH:-$(git rev-parse --short HEAD)};
export TS=$(date +%s);

export NODE_ENV=production;

echo "Current path:"
echo $PATH

set -ex

corepack enable;
corepack install || exit 1;
yarn install || exit 1;

yarn run build:storybook || exit 1;
